<template>
  <div class="container">
    <FormDetials v-if="form_visible" :detials="detials" :mode="mode" />
    <BaseList :list="list" @add="handleAdd" @detials="showDetials" v-else />
  </div>
</template>

<script>
import BaseList from "@/components/BaseList";
import FormDetials from "./form";
export default {
  name: "mfxxView",
  components: {
    BaseList,
    FormDetials,
  },
  data() {
    return {
      form_visible: false,
      list: [
        {
          img_src: "https://img01.yzcdn.cn/vant/cat.jpeg",
          line1text: ["方爽", "男"],
          line2text: "340822199410151638",
          line3text: "杭州市上城区龙泽苑街道龙跃苑二区3号楼2单元1008",
        },
        {
          img_src: "https://img01.yzcdn.cn/vant/cat.jpeg",
          line1text: ["方爽", "男"],
          line2text: "340822199410151638",
          line3text: "杭州市上城区龙泽苑街道龙跃苑二区3号楼2单元1008",
        },
        {
          img_src: "https://img01.yzcdn.cn/vant/cat.jpeg",
          line1text: ["方爽", "男"],
          line2text: "340822199410151638",
          line3text: "杭州市上城区龙泽苑街道龙跃苑二区3号楼2单元1008",
        },
        {
          img_src: "https://img01.yzcdn.cn/vant/cat.jpeg",
          line1text: ["方爽", "男"],
          line2text: "340822199410151638",
          line3text: "杭州市上城区龙泽苑街道龙跃苑二区3号楼2单元1008",
        },
        {
          img_src: "https://img01.yzcdn.cn/vant/cat.jpeg",
          line1text: ["方爽", "男"],
          line2text: "340822199410151638",
          line3text: "杭州市上城区龙泽苑街道龙跃苑二区3号楼2单元1008",
        },
        {
          img_src: "https://img01.yzcdn.cn/vant/cat.jpeg",
          line1text: ["方爽", "男"],
          line2text: "340822199410151638",
          line3text: "杭州市上城区龙泽苑街道龙跃苑二区3号楼2单元1008",
        },
      ],
      mode: 0,
      detials: {},
    };
  },
  methods: {
    handleAdd() {
      this.form_visible = true;
    },
    showDetials(values) {
      this.detials = values;
      this.mode = 1;
      this.form_visible = true;
    },
  },
};
</script>

<style></style>
